package com.herui.iot.request;

import com.herui.sdyu_lib.http.annotation.BodyType;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * Created by amanda.shan on 2022/12/4.
 */
@BodyType(bodyDateFormat = "yyyy-MM-dd HH:mm:ss")
public interface EvalRequest {

    /**
     * 查询当日评估任务
     *  [
     *                {
     * 			"evaluationSchemeId": 20,
     * 			"name": null,
     * 			"evaluationDate": "2022-11-25",
     * 			"evaluationStartTime": null,
     * 			"betaSchemeId": 1,
     * 			"betaSchemeName": "跑台",
     * 			"agreementId": 38,
     * 			"agreementName": "RAMP协议_斜坡",
     * 			"evaluationStatus": "NOT_STARTED",
     * 			"type": "TREADMILL_SLOPE"
     *        },
     * @param map
     * @return
     */
    @POST("/api/evaluationScheme/evaluatorApp/evaluationAssignment")
    Call<String> getEvalDay(@Body Map<String, Object> map);

    /**
     * 获取测试方法
     *  [
     *         {
     *             "id": 7,
     *             "name": "跑台rdjTest",
     *             "type": "TREADMILL_LADDER"
     *         },
     *         {
     *             "id": 8,
     *             "name": "跑台1",
     *             "type": "TREADMILL_LADDER"
     *         },
     * @return
     */
    @GET("/api/betaScheme/queryAll/1")
    Call<String> getBetaScheme();

    /**
     * 获取测试协议
     *  {
     *             "name": "功率车_阶梯_5W",
     *             "description": "保持60踏频,热身阶段阻力10Lv、功率30W,递增运动阶段每分钟增加功率5W,恢复阶段阻力10Lv、功率30W",
     *             "graphicDescription": null,
     *             "type": "POWER_CAR_LADDER",
     *             "createTime": "2022-09-24 01:23:00",
     *             "isEnabled": 1,
     *             "isUse": null,
     *             "id": 1
     *         },
     * @return
     */
    @GET("/api/agreement/queryList/{betaSchemeId}")
    Call<String> getAgreement(@Path("betaSchemeId") Long betaSchemeId);

    /**
     * 获取受试组别
     * @param organId   用户组织id
     * @return
     */
    @GET("/api/organ/query/organTreeList/{organId}")
    Call<String> getOrganTreeList(@Path("organId") Integer organId);


    /**
     * 获取历史评估列表
     * @param map
     * @return
     */
    @POST("/api/evaluationScheme/evaluatorApp/evaluationHistory")
    Call<String> getHistoryEval(@Body Map<String, Object> map);

    /**
     * 获取评估详情
     * @param evalId   用户组织id
     * @return
     */
    @GET("/api/evaluationScheme/evaluatorApp/query/detail/{evalId}")
    Call<String> getEvalDetail(@Path("evalId") Integer evalId);

    /**
     * 获取用户列表
     * @param map
     * @return
     */
    @POST("/api/user/rateePageList")
    Call<String> rateePageList(@Body Map<String, Object> map);

    /**
     * 功率车类型的测试方案显示预计功率
     * @param userId
     * @return
     */
    @POST("/api/evaluationScheme/calculatePower//{userId}")
    Call<String> calculatePower(@Path("userId") Integer userId);

    /**
     * 创建评估
     * @param map
     * @return
     */
    @POST("/api/evaluationScheme/create")
    Call<String> create(@Body Map<String, Object> map);

}
